﻿/// <reference path="../utilities/FXDom.js" />
///--------------------------------------------------------------------
/// <file name="HttpRequest.js">
///   The HttpRequest object, sent to a RoutingHandler when a request URL
///   matches the Route for that RoutingHandler.
/// </file>
///--------------------------------------------------------------------

NAMFox.ns(function() { with (NAMFox) {

this.HttpRequest = function(htmlDocument, routeData) {
    /// <summary>Initializes a new instance of the HttpRequest class.</summary>
    /// <param name="document" domElement="true">The HTML Document object corresponding to the request.</param>
    /// <field name="routeData" type="Object">Contains wildcard data from the URL specified by the Route.</field>
    
    this.htmlDocument = htmlDocument;
    this.routeData = routeData;
}

HttpRequest.prototype = {
    $: function(selector, context) {
        /// <summary>Selects elements with the given expression.</summary>
        /// <param name="selector" type="String">
        ///   1. #ID - The ID of a specific element.
        ///   2. .class - Specifies to retrieve elements with the specified class name.
        ///   3. DOM elements around which to wrap FXDom functionality.
        /// </param>
        /// <returns type="FXDom" />
        
        return $FX(selector, context || this.htmlDocument);
    }
};

}});